#!/usr/bin/env node

const fs=require('fs');

const width=16,
      height=16;
let pSize=width*height*4
let tSize=pSize+54;

let buf=Buffer.alloc(tSize)
  buf.fill(0);
buf.write('BM');
buf.writeUInt32LE(tSize,0x02);
buf.writeUInt32LE(54,0x0a)
buf.writeUInt16LE(32,0x1c);
buf.writeUInt16LE(1,0x1a);
buf.writeUInt32LE(pSize,0x22);
buf.writeInt32LE(width,0x12);

for(let i=54;i<tSize;i+=4){
  buf.writeUInt32LE(0xff0000ff,i);
}
f.writeFile('./out.bmp',buf,(err)=>{
  if(err!=null){
    console.error(err);
    process.exit(1);
  }
})
